#include "StdAfx.h"
#include "lnc.h"
#include "btime.h"		//for port info
#include "machine/LockNChaseMachine.h"

static dip_t dip1[] =
	{
	{"Coin 1",2,3,{{"2 coins/1 credit",0},{"1 coin/3 credits",1},{"1 coin/2 credits",2},{"1 coin/1 credit",3}}},
	{"Coin 2",2,0xC,{{"2 coins/1 credit",0},{"1 coin/3 credits",4},{"1 coin/2 credits",8},{"1 coin/1 credit",0xC}}},
	{"Test",2,0x30,{{"ram test",0},{"all tests",0x10},{"watchdog test",0x20},{"disabled",0x30}}},
	{"Cabinet type",1,0,{{"upright",0},{"cocktail",0x40}}},
	{"VBlank",-1,0,{{"off",0},{"on",0x80}}},
	{0,0,0,0,0}	
	};

static dip_t dip2[] =
	{
	{"Lives",1,1,{{"5",0},{"3",1}}},
	{"Bonus life",2,6,{{"none",0},{"30,000",2},{"20,000",4},{"15,000",6}}},
	{"Game speed",1,8,{{"fast",0},{"slow",8}}},
	{"Unknown",1,0,{{"off",0},{"on",0x10}}},
	{"Unknown",1,0,{{"off",0},{"on",0x20}}},
	{"Unknown",1,0,{{"off",0},{"on",0x40}}},
	{"Unknown",1,0,{{"off",0},{"on",0x80}}},
	{0,0,0,0,0}	
	};

static InputPort Port3 =
	{
		{
		{"Start 1",	I_START1,	0x01,	I_LOW},
		{"Start 2",	I_START2,	0x02,	I_LOW},
		{"Unknown",	0,				0x04,	I_LOW},
		{"Unknown",	0,				0x08,	I_LOW},
		{"Unknown",	0,				0x10,	I_LOW},
		{"Unknown",	0,				0x20,	I_LOW},
		{"Coin 1",	I_COIN1,		0x40,	I_LOW | I_CPU_NMI(0)},
		{"Coin 2",	I_COIN2,		0x80,	I_LOW | I_CPU_NMI(0)},
		}
	};

static highscore_t highscore[] =
	{
	{0x0008,3},
	{0x004C,7},
	{0x0294,0xF},
	{0x02A6,0xF},
	{0,-1}
	};

Clnc::Clnc()
{
SetName("lnc");							//set romset name
SetScreen(256,256,ROTATE_270);
SetHighScoreInfo(highscore);
SetDip(0,dip1);
SetDip(1,dip2);
SetPort(0,&btimePort1);
SetPort(1,&btimePort2);
SetPort(2,&Port3);
AddROM("s3-3d",0xC000,0x1000,0x1ab4f2c2,ROM_CPU1);
AddROM("s2-3c",0xD000,0x1000,0x5e46b789,ROM_CPU1);
AddROM("s1-3b",0xE000,0x1000,0x1308a32e,ROM_CPU1);
AddROM("s0-3a",0xF000,0x1000,0xbeb4b1fc,ROM_CPU1);
AddROM("sa-1h",0xF000,0x1000,0x379387ec,ROM_CPU2);
AddROM("s4-11l",0x0000,0x1000,0xa2162a9e,ROM_VROM1);
AddROM("s5-11m",0x1000,0x1000,0x12f1c2db,ROM_VROM1);
AddROM("s6-13l",0x2000,0x1000,0xd21e2a57,ROM_VROM1);
AddROM("s7-13m",0x3000,0x1000,0xc4f247cd,ROM_VROM1);
AddROM("s8-15l",0x4000,0x1000,0x672a92d0,ROM_VROM1);
AddROM("s9-15m",0x5000,0x1000,0x87c8ee9a,ROM_VROM1);
AddROM("sc-5m",0x0000,0x0020,0x2a976ebe,ROM_PROM);
AddROM("sb-4c",0x0020,0x0020,0xa29b4204,ROM_PROM);
}

CMachine *Clnc::CreateMachine()
{
return(new CLockNChaseMachine());
}
